package com.dubbo.cp.provider.serviceImpl;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;

import com.alibaba.dubbo.config.annotation.Service;
import com.dubbo.cp.IService.CourseService;
import com.dubbo.cp.entity.CourseEntity;
import com.dubbo.cp.provider.mapper.CourseMapper;
@Service
public class CourseServiceImpl implements CourseService {

	@Autowired
	CourseMapper courseMapper;

	@Override
	public CourseEntity findCourseByCourseid(int id) {
		// TODO Auto-generated method stub
		return courseMapper.findCourseByCourseid(id);
	}

	@Override
	public void insertCourseEntity(CourseEntity courseEntity) {
		// TODO Auto-generated method stub

		courseMapper.insertCourseEntity(courseEntity);
	}

	@Override
	public void deleteCourseEntity(int id) {
		// TODO Auto-generated method stub
		courseMapper.deleteById(id);
	}

	@Override
	public CourseEntity findCourseByCourse(String courseName) {
		// TODO Auto-generated method stub
		return courseMapper.findRoleByCourse(courseName);
	}

	@Override
	public List<CourseEntity> getCourseByPage(int start, int size) {
		// TODO Auto-generated method stub
		return courseMapper.getRoleByPage(start, size);
	}

	@Override
	public List<CourseEntity> getCourseList() {
		// TODO Auto-generated method stub
		return courseMapper.getCourseList();
	}

	@Override
	public void updateCourseEntity(CourseEntity courseEntity) {
		// TODO Auto-generated method stub
		courseMapper.UpdateCourseEntity(courseEntity);
	}

}
